import { handleRequest } from './index';
import request from '@/utils/request'
import {
    
    projectApiUrl
} from '../config'
// 获取-应急演练计划列表
export function getEmergencyPlanList(data) {
    return handleRequest({
        url: '/emergency-drill/plan/list',
        method: 'post',
        data
    })
}

// 获取-应急演练计划统计
export function getEmergencyPlanCount(data) {
    return handleRequest({
        url: '/emergency-drill/count',
        method: 'post',
        data
    })
}

// 获取-应急演练记录列表
export function getEmergencyRecordList(data) {
    return handleRequest({
        url: '/emergency-drill/record/list',
        method: 'post',
        data
    })
}

// 获取-应急演练记录统计
export function getEmergencyRecordCount(data) {
    return handleRequest({
        url: '/emergency-drill/count-record',
        method: 'post',
        data
    })
}


// 获取-项目下人员列表
export function getOrganizePeopleList(params) {
    return request({
        url:projectApiUrl+ '/projects/employees/list',
        method: 'get',
        params
    })
}



// 获取-应急演练记录详情
export function getRecordDetail(params) {
    return handleRequest({
        url: '/emergency-drill/record/detail',
        method: 'get',
        params
    })
}


// 打印-应急演练记录详情
export function getRecordDetailPrint(params) {
    return handleRequest({
        url: '/emergency-drill/record/detail/print',
        method: 'get',
        params
    })
}


// 添加-应急演练记录
export function addRecordDetail(data) {
    return handleRequest({
        url: '/emergency-drill/record',
        method: 'post',
        data
    })
}
// 修改-应急演练记录
export function editRecordDetail(data) {
    return handleRequest({
        url: '/emergency-drill/record/update',
        method: 'post',
        data
    })
}
// 删除-应急演练记录
export function deleteRecordDetail(params) {
    return handleRequest({
        url: '/emergency-drill/record/del',
        method: 'post',
        params
    })
}

// // 获取-应急演练记录详情
// export function getRecordDetail(params) {
//     return handleRequest({
//         url: '/emergency-drill/record',
//         method: 'get',
//         params
//     })
// }

// 获取-应急演练计划详情
export function getPlan(params) {
    return handleRequest({
        url: '/emergency-drill/plan',
        method: 'get',
        params
    })
}

// 修改-应急演练计划
export function editPlan(data) {
    return handleRequest({
        url: '/emergency-drill/plan/update',
        method: 'post',
        data
    })
}

// 添加-应急演练计划
export function addPlan(data) {
    return handleRequest({
        url: '/emergency-drill/plan',
        method: 'post',
        data
    })
}

// 删除-应急演练计划
export function deletePlan(params) {
    return handleRequest({
        url: '/emergency-drill/plan/del',
        method: 'post',
        params
    })
}

